from sqlalchemy import Column, Integer, String, Boolean

from app.models.base import BaseModel


class SysUsers(BaseModel):
    """
    用户表
    """
    __tablename__ = "sys_users"
    
    user_name = Column(String(64), unique=True, index=True, nullable=False, comment="用户名")
    real_name = Column(String(64), comment="姓名")
    email = Column(String(64), comment="邮箱")
    role = Column(Integer, default=0, comment="角色(0 普通用户，1管理员)")
    status = Column(Integer, default=1, comment="状态(0 禁用，1 启用)")
    password = Column(String(255), nullable=False, comment="密码")